/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sg.edu.nus.iss.pacman.game;

/**
 * A player can be PacMan or Ghost.
 * @author fredy
 */
public class Player
{
    // Position.
    public static final int UP = 1;
    public static final int DOWN = 2;
    public static final int LEFT = 3;
    public static final int RIGHT = 4;
    // Player type.
    public static final int PACMAN = 1;
    public static final int GHOST = 2;
    private int playerType;
    private int currentRow;
    private int currentColumn;
    private int position;
    private int numDotsEaten;
    private boolean dead;

    /**
     * Creates a new instance of Player.
     * @param playerType the player type
     */
    public Player(int playerType)
    {
        this.playerType = playerType;
    }

    /**
     * Gets the number of dots eaten.
     * @return the number of dots eaten
     */
    public int getNumDotsEaten()
    {
        return numDotsEaten;
    }

    /**
     * Sets the number of dots eaten.
     * @param numDotsEaten the number of dots eaten
     */
    public void setNumDotsEaten(int numDotsEaten)
    {
        this.numDotsEaten = numDotsEaten;
    }

    /**
     * Gets the current row.
     * @return the current row
     */
    public int getCurrentRow()
    {
        return currentRow;
    }

    /**
     * Sets the current row.
     * @param currentRow the current row
     */
    public void setCurrentRow(int currentRow)
    {
        this.currentRow = currentRow;
    }

    /**
     * Gets the current column.
     * @return the current column
     */
    public int getCurrentColumn()
    {
        return currentColumn;
    }

    /**
     * Sets the current column.
     * @param currentColumn the current column
     */
    public void setCurrentColumn(int currentColumn)
    {
        this.currentColumn = currentColumn;
    }

    /**
     * Checks if the player is dead.
     * @return true if the player is dead; false otherwise
     */
    public boolean isDead()
    {
        return dead;
    }

    /**
     * Sets the player to dead.
     * @param dead true for dead; false otherwise
     */
    public void setDead(boolean dead)
    {
        this.dead = dead;
    }

    /**
     * Gets the player type.
     * @return the player type
     */
    public int getPlayerType()
    {
        return playerType;
    }

    /**
     * Sets the player type.
     * @param playerType the player type
     */
    public void setPlayerType(int playerType)
    {
        this.playerType = playerType;
    }

    /**
     * Gets the position.
     * @return the position
     */
    public int getPosition()
    {
        return position;
    }

    /**
     * Sets the position.
     * @param position the position
     */
    public void setPosition(int position)
    {
        this.position = position;
    }
}
